package com.zs.zcerp.remark.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zs.zcerp.remark.entity.TgPpsScore;
import com.zs.zcerp.remark.mapper.TgPpsScoreMapper;
import com.zs.zcerp.remark.service.CommonService;
import com.zs.zcerp.remark.service.ITgPpsScoreService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@DS("oracle2")
@RequiredArgsConstructor
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class TgPpsScoreServiceImpl extends ServiceImpl<TgPpsScoreMapper, TgPpsScore> implements ITgPpsScoreService {

    @Autowired
    private TgPpsScoreMapper tgPpsScoreMapper;

    @Autowired
    private CommonService commonService;

    @Override
    public TgPpsScore findByPpsNo(String ppsNo,String scoreUser) {
        return tgPpsScoreMapper.queryByPpsNo(ppsNo,scoreUser);
    }

    @Override
    public Integer add(TgPpsScore tgPpsScore) {
        return tgPpsScoreMapper.add(tgPpsScore);
    }

    @Override
    public Integer checkIfExist(String ppsNo, String scoreUser) {
        return tgPpsScoreMapper.checkIfExist(ppsNo,scoreUser);
    }
}
